package com.lyp.springboot.controller;

import com.lyp.springboot.entity.SystemCfg;
import com.lyp.springboot.service.SystemCfgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 系统配置控制器
 *
 * @Author: Jackson
 * @CreateDate: 19/02/20 下午 14:50
 * @Version: 1.0
 */
@RequestMapping(value = "config")
@Controller
public class SystemCfgController {

    @Autowired
    private SystemCfgService service;

    /**
     * 接口测试，返回JSON数据
     * @return
     */
    @RequestMapping(value = "cache/getAll", method = RequestMethod.GET)
    @ResponseBody
    List<SystemCfg> index() {
        return service.getAll();
    }

}
